/**
 * @title TouzhuMatchDoneListCommunicater.java
 * @package com.esun.cheetah.biz.personal.attention
 * @description 获取已完场的已投注比赛
 * @author liugan
 * @date 2012-5-8
 * @copyright 深圳市易讯天空
 */
package com.esun.cheetah.biz.personal.attention;

import java.util.HashMap;

import com.esun.cheetah.biz.personal.personalinfo.UserInfo;
import com.esun.cheetah.config.BizCode;
import com.esun.cheetah.config.Config;
import com.esun.cheetah.config.Key;

import android.os.Handler;

/**
 * @title TouzhuMatchDoneListCommunicater
 * @description 获取已完场的已投注比赛
 * @author liugan
 */
public class TouzhuMatchDoneListCommunicater extends
		AbsTouzhuMatchListCommunicater {

	/**
	 * @param handler
	 */
	public TouzhuMatchDoneListCommunicater(Handler handler) {
		super(handler);
	}

	@Override
	public HashMap<String, String> comHashMap() {
		HashMap<String, String> gainUserAttentionMap = new HashMap<String, String>();
		gainUserAttentionMap.put(Key.KEY_ID, BizCode.BIZCODE_TOUZU_MATCH_LIST);
		gainUserAttentionMap.put(Key.KEY_USERNAME, UserInfo.getUserInfo()
				.getUserName());
		gainUserAttentionMap.put(Key.KEY_CK, UserInfo.getUserInfo().getCk());
		gainUserAttentionMap.put(Key.KEY_CLASSIFY,
				Key.KEY_OVER);
		return gainUserAttentionMap;
	}

	@Override
	protected MatchClassifyState getMatchState() {
		return MatchClassifyState.done;
	}

	@Override
	public void getServerResponseSuccess() {
		handlerFromAct
				.sendEmptyMessage(Config.GET_TOUZHU_MATCH_DONE_LIST_SUCCESS);
	}

	@Override
	public void getServerResponseFail(String serverRes) {
		handlerFromAct.sendEmptyMessage(Config.GET_TOUZHU_MATCH_DONE_LIST_FAIL);
	}

	@Override
	public void getServerResponseException() {
		handlerFromAct
				.sendEmptyMessage(Config.GET_TOUZHU_MATCH_DONE_LIST_EXCEPTION);
	}

}
